package com.yang.booking.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Student implements Serializable {
    //@TableId(type = IdType.INPUT) 手动赋值
    //@TableId(value = "s_id", type = IdType.AUTO) 自增
    //@TableId(value = "s_id", type = IdType.ASSIGN_ID) 自动，雪花算法
    @TableId(type = IdType.ASSIGN_UUID)
    private String sId;
    //@TableField(value = "s_name")
    //@TableField(exist = false) 不映射数据库
    private String sName;
    private String sBirth;
    private String sSex;
//    @TableField(exist = false)
//    private List<Score> scores = new ArrayList<>();
    @TableField(exist = false)
//    @TableField(typeHandler = JacksonTypeHandler.class)
//    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<Course> courses = new ArrayList<>();
//    @TableField(fill = FieldFill.INSERT)
//    private Date createAt;
//    @TableField(fill = FieldFill.DEFAULT)
//    private Date updateAt;


    public String getsId() {
        return sId;
    }

    public void setsId(String sId) {
        this.sId = sId;
    }

    public String getsName() {
        return sName;
    }

    public void setsName(String sName) {
        this.sName = sName;
    }

    public String getsBirth() {
        return sBirth;
    }

    public void setsBirth(String sBirth) {
        this.sBirth = sBirth;
    }

    public String getsSex() {
        return sSex;
    }

    public void setsSex(String sSex) {
        this.sSex = sSex;
    }

//    public Data getCreateAt() {
//        return createAt;
//    }
//
//    public void setCreateAt(Data createAt) {
//        this.createAt = createAt;
//    }
//
//    public Data getUpdateAt() {
//        return updateAt;
//    }
//
//    public void setUpdateAt(Data updateAt) {
//        this.updateAt = updateAt;
//    }


//    public List<Score> getScores() {
//        return scores;
//    }
//
//    public void setScores(List<Score> scores) {
//        this.scores = scores;
//    }
//
//    public List<Course> getCourses() {
//        return courses;
//    }

    public void setCourses(List<Course> courses) {
        this.courses = courses;
    }

    public List<Course> getCourses() {
        return courses;
    }
}
